<%--
  Created by IntelliJ IDEA.
  User: ZhengHQ
  Date: 2018-10-20
  Time: 20:59
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<div class="modal fade" id="add-modal-dialog" tabindex="-1" role="dialog" aria-labelledby="add-modal-dialog"
     aria-hidden="true">
    <form action="user!save.action" method="post" role="form"
          class="form-horizontal" id="add-modal-form">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h1 class="modal-title">添加用户</h1>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">×</span>
                    </button>
                </div>
                <div class="modal-body">
                    <div class="form-group">
                        <label for="name">用户名称</label>
                        <input type="text" class="form-control" id="name" name="name" placeholder="用户名称"/>
                    </div>
                    <div class="form-group">
                        <label for="pwd">用户密码</label>
                        <input type="password" class="form-control" id="pwd" name="pwd" placeholder="用户密码"/>
                    </div>
                    <div class="form-group">
                        <label for="address">用户地址</label>
                        <input type="text" class="form-control" id="address" name="address" placeholder="用户地址"/>
                    </div>
                    <div class="form-group">
                        <label for="phone">手机号码</label>
                        <input type="text" class="form-control" id="phone" name="phone" placeholder="手机号码"/>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                    <button type="submit" class="btn btn-primary">添加</button>
                </div>
            </div>
        </div>
    </form>
</div>
<div class="modal fade" id="update-modal-dialog" tabindex="-1" role="dialog" aria-labelledby="update-modal-dialog"
     aria-hidden="true">
    <form action="user!update.action" method="post" role="form"
          class="form-horizontal" id="update-modal-form">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h1 class="modal-title">修改用户</h1>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">×</span>
                    </button>
                </div>
                <div class="modal-body">
                    <input type="hidden" name="id" value="" id="mid"/>
                    <div class="form-group">
                        <label for="mname">用户名称</label>
                        <input type="text" class="form-control" id="mname" name="name" placeholder="用户名称"/>
                    </div>
                    <div class="form-group">
                        <label for="mpwd">用户密码</label>
                        <input type="password" class="form-control" id="mpwd" name="pwd" placeholder="用户密码"/>
                    </div>
                    <div class="form-group">
                        <label for="maddress">用户地址</label>
                        <input type="text" class="form-control" id="maddress" name="address" placeholder="用户地址"/>
                    </div>
                    <div class="form-group">
                        <label for="mphone">手机号码</label>
                        <input type="text" class="form-control" id="mphone" name="phone" placeholder="手机号码"/>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                    <button type="submit" class="btn btn-primary">修改</button>
                </div>
            </div>
        </div>
    </form>
</div>
<div id="delete-confirm" class="modal fade" aria-hidden="true" aria-labelledby="delete-confirm">
    <form action="user!delete.action" method="post" role="form"
          class="form-horizontal" id="delete-confirm-form">
        <div class="modal-dialog modal-danger">
            <div class="modal-content">
                <input type="hidden" name="id" value="" id="did"/>
                <div class="modal-header">
                    <h4 class="modal-title">警告</h4>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">×</span>
                    </button>
                </div>
                <div class="modal-body">
                    <p>
                        删除用户，删除后数据无法恢复，您确认要删除吗？
                    </p>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                    <button type="submit" class="btn btn-danger">删除</button>
                </div>
            </div>
        </div>
    </form>
</div>
<script type="text/javascript" src="${pageContext.request.contextPath}/scripts/user.js"></script>